package com.kfgj.hkp.manager.house.business.impl;

import com.kfgj.hkp.manager.AbstractManager;
import com.kfgj.hkp.common.utils.CodeGenUtils;
import com.kfgj.hkp.common.dataaccess.mybatis.IMyBatisBaseDao;
import com.kfgj.hkp.dao.house.ILinkCustomerDbDao;
import com.kfgj.hkp.entity.house.LinkCustomerEntity;
import com.kfgj.hkp.manager.house.business.ILinkCustomerManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description 描述
 * @Auth xpp
 * @Date 2019/11/19
 * @Version 1.0
 */
@Service
public class LinkCustomerManagerImpl extends AbstractManager<LinkCustomerEntity> implements ILinkCustomerManager {
    @Autowired
    private ILinkCustomerDbDao linkCustomerDbDao;


    @Override
    protected IMyBatisBaseDao<LinkCustomerEntity, Long> getMyBatisDao() {
        return this.linkCustomerDbDao;
    }

    @Override
    protected void beforeCreate(LinkCustomerEntity linkCustomerEntity) {
        linkCustomerEntity.setLinkcusCode(CodeGenUtils.generate("kc"));
    }
}
